{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Preprocess STRING-db PPI Network\n",
    "This notebook prepares the [STRING-db](https://string-db.org/) PPI network for use with graph convolutional networks.\n",
    "I use version `v11.0`, downloaded from [here](https://stringdb-static.org/download/protein.links.v11.0/9606.protein.links.v11.0.txt.gz) and preprocessed in the following way:\n",
    "\n",
    "* I remove scores > 0.85\n",
    "* I map the IDs to have Hugo symbols and emsembl IDs using the mygene service"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import mygene\n",
    "import networkx as nx\n",
    "import matplotlib.pyplot as plt\n",
    "import seaborn as sns\n",
    "%matplotlib inline"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "def get_gene_symbols_from_proteins(list_of_ensembl_ids):\n",
    "    # get Ensembl IDs for gene names\n",
    "    mg = mygene.MyGeneInfo()\n",
    "    res = mg.querymany(list_of_ensembl_ids,\n",
    "                       scopes='ensembl.protein',\n",
    "                       fields='symbol',\n",
    "                       species='human', returnall=True\n",
    "                      )\n",
    "\n",
    "    def get_symbol_and_ensembl(d):\n",
    "        if 'symbol' in d:\n",
    "            return [d['query'], d['symbol']]\n",
    "        else:\n",
    "            return [d['query'], None]\n",
    "\n",
    "    node_names = [get_symbol_and_ensembl(d) for d in res['out']]\n",
    "    # now, retrieve the names and IDs from a dictionary and put in DF\n",
    "    node_names = pd.DataFrame(node_names, columns=['Ensembl_ID', 'Symbol']).set_index('Ensembl_ID')\n",
    "    node_names.dropna(axis=0, inplace=True)\n",
    "    return node_names"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x7fee103175f8>"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "i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dpuZxQf4v0JERAaQAiEREemRmc0BvgKc6+6nAJ8lWun8Lnc/GbgX+EHBIVXAucD1wG+Bm4A5wElmNi/UKQVecPf5wBNEK6sfyp5Q51bgC6HsK8Cj7r4IeC9wo5mVAp8CWkKbvgks6OVtzQOmuvtcdz8JyK/Ifi/ww/A+zwLqgA+H+qcA54fXmxzqnwZ8xd1nm9mJwGXAu9x9HpAFruilDSIiMswUCImISG/OBZa6+x4Ad98LnAn8PDx/N/Dugvq/dXcnukuy093XuHsOeAmYEerkgPvD9j3dji/0QHhcUXDsBcCXzWwl8DiQAqYD7wnnwt1XA6t7eU+bgGPM7L/M7CKgyczKiIKjB8M52ty9JbTtF+6edfedRIHbonCe59x9c9g+jyj4ej607TzgmF7aICIiw0xzhEREpDcG+GHqFD7fHh5zBdv5/Z7+5vR0/vzx2YJjDfiIu7/SpZFmvZ2n64u515vZKcCFwKeBjwGf66G69XKq/d3q/czdb+hLG0REZPjpjpCIiPRmGfAxM5sAYGbVwJ+BJeH5K4Cn+nnOGLA4bF/ez+MfBv7RQuRjZqeG8idDWzCzucDJPZ3AzGqAmLv/GvhnYL67NwFbzezSUCdpZuPCeS8L84qOILrz9NwhTrsMWGxmteH4ajM7qh/vS0REhpjuCImISI/c/SUz+ybwhJllgReBzwB3mtkXgd3AJ/t52v3AHDNbATQSza3pq38Dvg+sDsHQ68DFRPOIfmJmq4GVHDpYyZsa6ua/DMzfxbkSuM3MvgGkgY8CDxINBVxFdMfpS+6+I5+8Ic/d15nZV4E/hPOmie42vdGP9yYiIkPIoqHcIiIiIiIiY4eGxomIiIiIyJijoXEiIvKOZWbPAsluxVe6+5rhaI+IiIwcGhonIiIiIiJjjobGiYiIiIjImKNASERERERExhwFQiIiIiIiMuYoEBIRERERkTFHgZCIiIiIiIw5/w9BJqVBOchSyAAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 1008x576 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "string_ppis = pd.read_csv('../data/networks/STRING_9606.protein.links.v11.0.txt', sep=' ')\n",
    "fig = plt.figure(figsize=(14, 8))\n",
    "sns.distplot(string_ppis.combined_score, kde_kws={'bw': 20})"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "high_conf_string_ppis = string_ppis[string_ppis.combined_score >= 850].copy() # same as 0.85 threshold (they multiplied by 1000 to have ints)\n",
    "high_conf_string_ppis.loc[:, 'protein1'] = [i[1] for i in high_conf_string_ppis.protein1.str.split('.')]\n",
    "high_conf_string_ppis.loc[:, 'protein2'] = [i[1] for i in high_conf_string_ppis.protein2.str.split('.')]\n",
    "high_conf_string_ppis.to_csv('../data/networks/string_ENSP_ids_highconf.tsv', sep='\\t', compression='gzip')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "querying 1-1000...done.\n",
      "querying 1001-2000...done.\n",
      "querying 2001-3000...done.\n",
      "querying 3001-4000...done.\n",
      "querying 4001-5000...done.\n",
      "querying 5001-6000...done.\n",
      "querying 6001-7000...done.\n",
      "querying 7001-8000...done.\n",
      "querying 8001-9000...done.\n",
      "querying 9001-10000...done.\n",
      "querying 10001-11000...done.\n",
      "querying 11001-12000...done.\n",
      "querying 12001-13000...done.\n",
      "querying 13001-13328...done.\n",
      "Finished.\n",
      "121 input query terms found no hit:\n",
      "\t['ENSP00000215939', 'ENSP00000222598', 'ENSP00000230732', 'ENSP00000266991', 'ENSP00000267012', 'ENS\n"
     ]
    }
   ],
   "source": [
    "ens_names = high_conf_string_ppis.protein1.append(high_conf_string_ppis.protein2).unique()\n",
    "ens_to_symbol = get_gene_symbols_from_proteins(ens_names)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "p1_incl = high_conf_string_ppis.join(ens_to_symbol, on='protein1', how='inner', rsuffix='_p1')\n",
    "both_incl = p1_incl.join(ens_to_symbol, on='protein2', how='inner', rsuffix='_p2')\n",
    "string_edgelist_symbols = both_incl.drop(['protein1', 'protein2'], axis=1)\n",
    "string_edgelist_symbols.columns = ['confidence', 'partner1', 'partner2']\n",
    "string_ppi_final = string_edgelist_symbols[['partner1', 'partner2', 'confidence']]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Network with 13179 nodes and 336551 edges\n"
     ]
    }
   ],
   "source": [
    "G = nx.from_pandas_edgelist(string_ppi_final, source='partner1', target='partner2')\n",
    "print (\"Network with {} nodes and {} edges\".format(G.number_of_nodes(), G.number_of_edges()))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "string_ppi_final.to_csv('../data/networks/string_SYMBOLS_highconf.tsv', sep='\\t', compression='gzip')"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
